home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-09-20 | 44.2 KB | 2,066 lines |
- #define EXTERN extern
- #include "texd.h"
-
- alteraux () {
- alteraux_regmem
- halfword c ;
- if ( curchr != abs ( curlist .modefield ) )
- reportillegalcase () ;
- else {
-
- c = curchr ;
- scanoptionalequals () ;
- if ( c == 1 )
- {
- scandimen ( false , false , false ) ;
- curlist .auxfield = curval ;
- }
- else {
-
- scanint () ;
- if ( ( curval <= 0 ) || ( curval > 32767 ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 1059 ) ;
- }
- {
- helpptr = 1 ;
- helpline [ 0 ] = 1060 ;
- }
- interror ( curval ) ;
- }
- else curlist .auxfield = curval ;
- }
- }
- }
- alterprevgraf () {
- alterprevgraf_regmem
- integer p ;
- nest [ nestptr ] = curlist ;
- p = nestptr ;
- while ( abs ( nest [ p ] .modefield ) != 1 ) decr ( p ) ;
- scanoptionalequals () ;
- scanint () ;
- if ( curval < 0 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 802 ) ;
- }
- printesc ( 390 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 1061 ;
- }
- interror ( curval ) ;
- }
- else {
-
- nest [ p ] .pgfield = curval ;
- curlist = nest [ nestptr ] ;
- }
- }
- alterpagesofar () {
- alterpagesofar_regmem
- schar c ;
- c = curchr ;
- scanoptionalequals () ;
- scandimen ( false , false , false ) ;
- pagesofar [ c ] = curval ;
- }
- alterinteger () {
- alterinteger_regmem
- schar c ;
- c = curchr ;
- scanoptionalequals () ;
- scanint () ;
- if ( c == 0 )
- deadcycles = curval ;
- else insertpenalties = curval ;
- }
- alterboxdimen () {
- alterboxdimen_regmem
- smallnumber c ;
- eightbits b ;
- c = curchr ;
- scaneightbitint () ;
- b = curval ;
- scanoptionalequals () ;
- scandimen ( false , false , false ) ;
- if ( eqtb [ 4322 + b ] .hh .v.RH != 0 )
- mem [ eqtb [ 4322 + b ] .hh .v.RH + c ] .cint = curval ;
- }
- znewfont ( a )
- smallnumber a ;
- {/* 50 */ newfont_regmem
- halfword u ;
- scaled s ;
- internalfontnumber f ;
- strnumber t ;
- schar oldsetting ;
- if ( jobname == 0 )
- openlogfile () ;
- getrtoken () ;
- u = curcs ;
- if ( u >= 258 )
- t = hash [ u ] .v.RH ;
- else if ( u >= 129 )
- if ( u == 257 )
- t = 1065 ;
- else t = u - 129 ;
- else {
-
- oldsetting = selector ;
- selector = 21 ;
- print ( 1065 ) ;
- print ( u - 1 ) ;
- selector = oldsetting ;
- {
- if ( poolptr + 1 > poolsize )
- overflow ( 128 , poolsize - initpoolptr ) ;
- }
- t = makestring () ;
- }
- if ( ( a >= 4 ) )
- geqdefine ( u , 86 , 0 ) ;
- else eqdefine ( u , 86 , 0 ) ;
- scanoptionalequals () ;
- scanfilename () ;
- nameinprogress = true ;
- if ( scankeyword ( 1066 ) )
- {
- scandimen ( false , false , false ) ;
- s = curval ;
- if ( ( s <= 0 ) || ( s >= 134217728L ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 1068 ) ;
- }
- printscaled ( s ) ;
- print ( 1069 ) ;
- {
- helpptr = 2 ;
- helpline [ 1 ] = 1070 ;
- helpline [ 0 ] = 1071 ;
- }
- error () ;
- s = 10 * 65536L ;
- }
- }
- else if ( scankeyword ( 1067 ) )
- {
- scanint () ;
- s = - (integer) curval ;
- if ( ( curval <= 0 ) || ( curval > 32768L ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 410 ) ;
- }
- {
- helpptr = 1 ;
- helpline [ 0 ] = 411 ;
- }
- interror ( curval ) ;
- s = -1000 ;
- }
- }
- else s = -1000 ;
- nameinprogress = false ;
- {register integer for_end; f = 1 ; for_end = fontptr ; if ( f <= for_end)
- do
- if ( streqstr ( fontname [ f ] , curname ) && streqstr ( fontarea [ f ] ,
- curarea ) )
- {
- if ( s > 0 )
- {
- if ( s == fontsize [ f ] )
- goto lab50 ;
- }
- else if ( fontsize [ f ] == xnoverd ( fontdsize [ f ] , - (integer) s ,
- 1000 ) )
- goto lab50 ;
- }
- while ( f++ < for_end ) ; }
- f = readfontinfo ( u , curname , curarea , s ) ;
- lab50: eqtb [ u ] .hh .v.RH = f ;
- eqtb [ 3268 + f ] = eqtb [ u ] ;
- hash [ 3268 + f ] .v.RH = t ;
- }
- newinteraction () {
- newinteraction_regmem
- println () ;
- interaction = curchr ;
- if ( interaction == 0 )
- selector = 16 ;
- else selector = 17 ;
- if ( jobname != 0 )
- selector = selector + 2 ;
- }
- doassignments () {
- /* 10 */ doassignments_regmem
- while ( true ) {
-
- do {
- getxtoken () ;
- } while ( ! ( ( curcmd != 10 ) && ( curcmd != 0 ) ) ) ;
- if ( curcmd <= 69 )
- return ;
- prefixedcommand () ;
- }
- }
- openorclosein () {
- openorclosein_regmem
- schar c ;
- schar n ;
- c = curchr ;
- scanfourbitint () ;
- n = curval ;
- if ( readopen [ n ] != 2 )
- {
- aclose ( readfile [ n ] ) ;
- readopen [ n ] = 2 ;
- }
- if ( c != 0 )
- {
- scanoptionalequals () ;
- scanfilename () ;
- if ( curext == 206 )
- curext = 644 ;
- packfilename ( curname , curarea , curext ) ;
- if ( aopenin ( readfile [ n ] , readpathspec ) )
- readopen [ n ] = 1 ;
- }
- }
- issuemessage () {
- issuemessage_regmem
- schar oldsetting ;
- schar c ;
- strnumber s ;
- c = curchr ;
- mem [ memtop - 12 ] .hh .v.RH = scantoks ( false , true ) ;
- oldsetting = selector ;
- selector = 21 ;
- tokenshow ( defref ) ;
- selector = oldsetting ;
- flushlist ( defref ) ;
- {
- if ( poolptr + 1 > poolsize )
- overflow ( 128 , poolsize - initpoolptr ) ;
- }
- s = makestring () ;
- if ( c == 0 )
- {
- if ( termoffset + ( strstart [ s + 1 ] - strstart [ s ] ) > maxprintline -
- 2 )
- println () ;
- else if ( ( termoffset > 0 ) || ( fileoffset > 0 ) )
- printchar ( 32 ) ;
- print ( s ) ;
- termflush ( stdout ) ;
- }
- else {
-
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( s ) ;
- }
- if ( eqtb [ 4065 ] .hh .v.RH != 0 )
- useerrhelp = true ;
- else if ( longhelpseen )
- {
- helpptr = 1 ;
- helpline [ 0 ] = 1078 ;
- }
- else {
-
- if ( interaction < 3 )
- longhelpseen = true ;
- {
- helpptr = 4 ;
- helpline [ 3 ] = 1079 ;
- helpline [ 2 ] = 1080 ;
- helpline [ 1 ] = 1081 ;
- helpline [ 0 ] = 1082 ;
- }
- }
- error () ;
- useerrhelp = false ;
- }
- {
- decr ( strptr ) ;
- poolptr = strstart [ strptr ] ;
- }
- }
- shiftcase () {
- shiftcase_regmem
- halfword b ;
- halfword p ;
- halfword t ;
- eightbits c ;
- b = curchr ;
- p = scantoks ( false , false ) ;
- p = mem [ defref ] .hh .v.RH ;
- while ( p != 0 ) {
-
- t = mem [ p ] .hh .v.LH ;
- if ( t < 4225 )
- {
- if ( t >= 4096 )
- t = t - 1 ;
- c = t % 256 ;
- if ( c < 128 )
- if ( eqtb [ b + c ] .hh .v.RH != 0 )
- t = 256 * ( t / 256 ) + eqtb [ b + c ] .hh .v.RH ;
- if ( t >= 4096 )
- mem [ p ] .hh .v.LH = t + 1 ;
- else mem [ p ] .hh .v.LH = t ;
- }
- p = mem [ p ] .hh .v.RH ;
- }
- begintokenlist ( mem [ defref ] .hh .v.RH , 3 ) ;
- {
- mem [ defref ] .hh .v.RH = avail ;
- avail = defref ;
- ;
- #ifdef STAT
- decr ( dynused ) ;
- #endif /* STAT */
- }
- }
- showwhatever () {
- /* 50 */ showwhatever_regmem
- halfword p ;
- switch ( curchr )
- {case 3 :
- {
- begindiagnostic () ;
- showactivities () ;
- }
- break ;
- case 1 :
- {
- scaneightbitint () ;
- begindiagnostic () ;
- printnl ( 1100 ) ;
- printint ( curval ) ;
- printchar ( 61 ) ;
- if ( eqtb [ 4322 + curval ] .hh .v.RH == 0 )
- print ( 275 ) ;
- else showbox ( eqtb [ 4322 + curval ] .hh .v.RH ) ;
- }
- break ;
- case 0 :
- {
- gettoken () ;
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 1094 ) ;
- if ( curcs != 0 )
- {
- sprintcs ( curcs ) ;
- printchar ( 61 ) ;
- }
- printmeaning () ;
- goto lab50 ;
- }
- break ;
- default:
- {
- p = thetoks () ;
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 1094 ) ;
- tokenshow ( memtop - 3 ) ;
- flushlist ( mem [ memtop - 3 ] .hh .v.RH ) ;
- goto lab50 ;
- }
- break ;
- }
- enddiagnostic ( true ) ;
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 1101 ) ;
- }
- if ( selector == 19 )
- if ( eqtb [ 5296 ] .cint <= 0 )
- {
- selector = 17 ;
- print ( 1102 ) ;
- selector = 19 ;
- }
- lab50: if ( interaction < 3 )
- {
- helpptr = 0 ;
- decr ( errorcount ) ;
- }
- else if ( eqtb [ 5296 ] .cint > 0 )
- {
- {
- helpptr = 3 ;
- helpline [ 2 ] = 1089 ;
- helpline [ 1 ] = 1090 ;
- helpline [ 0 ] = 1091 ;
- }
- }
- else {
-
- {
- helpptr = 5 ;
- helpline [ 4 ] = 1089 ;
- helpline [ 3 ] = 1090 ;
- helpline [ 2 ] = 1091 ;
- helpline [ 1 ] = 1092 ;
- helpline [ 0 ] = 1093 ;
- }
- }
- error () ;
- }
- znewwhatsit ( s , w )
- smallnumber s ;
- smallnumber w ;
- {newwhatsit_regmem
- halfword p ;
- p = getnode ( w ) ;
- mem [ p ] .hh.b0 = 8 ;
- mem [ p ] .hh.b1 = s ;
- mem [ curlist .tailfield ] .hh .v.RH = p ;
- curlist .tailfield = p ;
- }
- znewwritewhatsit ( w )
- smallnumber w ;
- {newwritewhatsit_regmem
- newwhatsit ( curchr , w ) ;
- if ( w != 2 )
- scanfourbitint () ;
- else {
-
- scanint () ;
- if ( curval < 0 )
- curval = 17 ;
- else if ( curval > 15 )
- curval = 16 ;
- }
- mem [ curlist .tailfield + 1 ] .hh .v.LH = curval ;
- }
- doextension () {
- doextension_regmem
- integer i, j, k ;
- halfword p, q, r ;
- switch ( curchr )
- {case 0 :
- {
- newwritewhatsit ( 3 ) ;
- scanoptionalequals () ;
- scanfilename () ;
- mem [ curlist .tailfield + 1 ] .hh .v.RH = curname ;
- mem [ curlist .tailfield + 2 ] .hh .v.LH = curarea ;
- mem [ curlist .tailfield + 2 ] .hh .v.RH = curext ;
- }
- break ;
- case 1 :
- {
- k = curcs ;
- newwritewhatsit ( 2 ) ;
- curcs = k ;
- p = scantoks ( false , false ) ;
- mem [ curlist .tailfield + 1 ] .hh .v.RH = defref ;
- }
- break ;
- case 2 :
- {
- newwritewhatsit ( 2 ) ;
- mem [ curlist .tailfield + 1 ] .hh .v.RH = 0 ;
- }
- break ;
- case 3 :
- {
- newwhatsit ( 3 , 2 ) ;
- mem [ curlist .tailfield + 1 ] .hh .v.LH = 0 ;
- p = scantoks ( false , true ) ;
- mem [ curlist .tailfield + 1 ] .hh .v.RH = defref ;
- }
- break ;
- case 4 :
- {
- getxtoken () ;
- if ( ( curcmd == 59 ) && ( curchr <= 2 ) )
- {
- p = curlist .tailfield ;
- doextension () ;
- outwhat ( curlist .tailfield ) ;
- flushnodelist ( curlist .tailfield ) ;
- curlist .tailfield = p ;
- mem [ p ] .hh .v.RH = 0 ;
- }
- else backinput () ;
- }
- break ;
- default:
- confusion ( 1134 ) ;
- break ;
- }
- }
- handlerightbrace () {
- handlerightbrace_regmem
- halfword p, q ;
- scaled d ;
- integer f ;
- switch ( curgroup )
- {case 1 :
- unsave () ;
- break ;
- case 0 :
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 892 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 893 ;
- helpline [ 0 ] = 894 ;
- }
- error () ;
- }
- break ;
- case 14 :
- case 15 :
- case 16 :
- extrarightbrace () ;
- break ;
- case 2 :
- package ( 0 ) ;
- break ;
- case 3 :
- {
- adjusttail = memtop - 5 ;
- package ( 0 ) ;
- }
- break ;
- case 4 :
- {
- endgraf () ;
- package ( 0 ) ;
- }
- break ;
- case 5 :
- {
- endgraf () ;
- package ( 4 ) ;
- }
- break ;
- case 11 :
- {
- endgraf () ;
- q = eqtb [ 3536 ] .hh .v.RH ;
- incr ( mem [ q ] .hh .v.RH ) ;
- d = eqtb [ 5707 ] .cint ;
- f = eqtb [ 5309 ] .cint ;
- unsave () ;
- decr ( saveptr ) ;
- p = vpackage ( mem [ curlist .headfield ] .hh .v.RH , 0 , 1 ,
- 1073741823L ) ;
- popnest () ;
- if ( savestack [ saveptr + 0 ] .cint < 255 )
- {
- {
- mem [ curlist .tailfield ] .hh .v.RH = getnode ( 5 ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- mem [ curlist .tailfield ] .hh.b0 = 3 ;
- mem [ curlist .tailfield ] .hh.b1 = savestack [ saveptr + 0 ] .cint ;
- mem [ curlist .tailfield + 3 ] .cint = mem [ p + 3 ] .cint + mem [ p +
- 2 ] .cint ;
- mem [ curlist .tailfield + 4 ] .hh .v.LH = mem [ p + 5 ] .hh .v.RH ;
- mem [ curlist .tailfield + 4 ] .hh .v.RH = q ;
- mem [ curlist .tailfield + 2 ] .cint = d ;
- mem [ curlist .tailfield + 1 ] .cint = f ;
- }
- else {
-
- {
- mem [ curlist .tailfield ] .hh .v.RH = getnode ( 2 ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- mem [ curlist .tailfield ] .hh.b0 = 5 ;
- mem [ curlist .tailfield ] .hh.b1 = 0 ;
- mem [ curlist .tailfield + 1 ] .cint = mem [ p + 5 ] .hh .v.RH ;
- deleteglueref ( q ) ;
- }
- freenode ( p , 7 ) ;
- if ( nestptr == 0 )
- buildpage () ;
- }
- break ;
- case 8 :
- {
- if ( curinput .locfield != 0 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 858 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 859 ;
- helpline [ 0 ] = 860 ;
- }
- error () ;
- do {
- gettoken () ;
- } while ( ! ( curinput .locfield == 0 ) ) ;
- }
- endtokenlist () ;
- endgraf () ;
- unsave () ;
- outputactive = false ;
- insertpenalties = 0 ;
- if ( eqtb [ 4577 ] .hh .v.RH != 0 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 861 ) ;
- }
- printesc ( 274 ) ;
- printint ( 255 ) ;
- {
- helpptr = 3 ;
- helpline [ 2 ] = 862 ;
- helpline [ 1 ] = 863 ;
- helpline [ 0 ] = 864 ;
- }
- boxerror ( 255 ) ;
- }
- if ( curlist .tailfield != curlist .headfield )
- {
- mem [ pagetail ] .hh .v.RH = mem [ curlist .headfield ] .hh .v.RH ;
- pagetail = curlist .tailfield ;
- }
- if ( mem [ memtop - 2 ] .hh .v.RH != 0 )
- {
- if ( mem [ memtop - 1 ] .hh .v.RH == 0 )
- nest [ 0 ] .tailfield = pagetail ;
- mem [ pagetail ] .hh .v.RH = mem [ memtop - 1 ] .hh .v.RH ;
- mem [ memtop - 1 ] .hh .v.RH = mem [ memtop - 2 ] .hh .v.RH ;
- mem [ memtop - 2 ] .hh .v.RH = 0 ;
- pagetail = memtop - 2 ;
- }
- popnest () ;
- buildpage () ;
- }
- break ;
- case 10 :
- builddiscretionary () ;
- break ;
- case 6 :
- {
- backinput () ;
- curtok = 7355 ;
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 483 ) ;
- }
- printesc ( 752 ) ;
- print ( 484 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 973 ;
- }
- inserror () ;
- }
- break ;
- case 7 :
- {
- endgraf () ;
- unsave () ;
- alignpeek () ;
- }
- break ;
- case 12 :
- {
- endgraf () ;
- unsave () ;
- saveptr = saveptr - 2 ;
- p = vpackage ( mem [ curlist .headfield ] .hh .v.RH , savestack [
- saveptr + 1 ] .cint , savestack [ saveptr + 0 ] .cint , 1073741823L ) ;
- popnest () ;
- {
- mem [ curlist .tailfield ] .hh .v.RH = newnoad () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- mem [ curlist .tailfield ] .hh.b0 = 29 ;
- mem [ curlist .tailfield + 1 ] .hh .v.RH = 2 ;
- mem [ curlist .tailfield + 1 ] .hh .v.LH = p ;
- }
- break ;
- case 13 :
- buildchoices () ;
- break ;
- case 9 :
- {
- unsave () ;
- decr ( saveptr ) ;
- mem [ savestack [ saveptr + 0 ] .cint ] .hh .v.RH = 3 ;
- p = finmlist ( 0 ) ;
- mem [ savestack [ saveptr + 0 ] .cint ] .hh .v.LH = p ;
- if ( p != 0 )
- if ( mem [ p ] .hh .v.RH == 0 )
- if ( mem [ p ] .hh.b0 == 16 )
- {
- if ( mem [ p + 3 ] .hh .v.RH == 0 )
- if ( mem [ p + 2 ] .hh .v.RH == 0 )
- {
- mem [ savestack [ saveptr + 0 ] .cint ] .hh = mem [ p + 1 ] .hh ;
- freenode ( p , 4 ) ;
- }
- }
- else if ( mem [ p ] .hh.b0 == 28 )
- if ( savestack [ saveptr + 0 ] .cint == curlist .tailfield + 1 )
- if ( mem [ curlist .tailfield ] .hh.b0 == 16 )
- {
- q = curlist .headfield ;
- while ( mem [ q ] .hh .v.RH != curlist .tailfield ) q = mem [ q ] .hh
- .v.RH ;
- mem [ q ] .hh .v.RH = p ;
- freenode ( curlist .tailfield , 4 ) ;
- curlist .tailfield = p ;
- }
- }
- break ;
- default:
- confusion ( 895 ) ;
- break ;
- }
- }
- maincontrol () {
- /* 60 21 70 71 72 73 74 10 */ maincontrol_regmem
- integer t ;
- quarterword l ;
- eightbits c ;
- internalfontnumber f ;
- halfword r ;
- halfword p ;
- integer k ;
- halfword q ;
- fourquarters i ;
- fourquarters j ;
- integer s ;
- boolean ligaturepresent ;
- if ( eqtb [ 4063 ] .hh .v.RH != 0 )
- begintokenlist ( eqtb [ 4063 ] .hh .v.RH , 12 ) ;
- lab60: getxtoken () ;
- lab21: if ( interrupt != 0 )
- if ( OKtointerrupt )
- {
- backinput () ;
- {
- if ( interrupt != 0 )
- pauseforinstructions () ;
- }
- goto lab60 ;
- }
- ;
- #ifdef DEBUG
- if ( panicking )
- checkmem ( false ) ;
- #endif /* DEBUG */
- if ( eqtb [ 5303 ] .cint > 0 )
- showcurcmdchr () ;
- switch ( abs ( curlist .modefield ) + curcmd )
- {case 112 :
- case 113 :
- case 168 :
- goto lab70 ;
- break ;
- case 117 :
- {
- scancharnum () ;
- curchr = curval ;
- goto lab70 ;
- }
- break ;
- case 111 :
- if ( curlist .auxfield == 1000 )
- goto lab74 ;
- else appspace () ;
- break ;
- case 165 :
- case 265 :
- goto lab74 ;
- break ;
- case 1 :
- case 101 :
- case 201 :
- case 11 :
- case 211 :
- ;
- break ;
- case 40 :
- case 140 :
- case 240 :
- {
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- goto lab21 ;
- }
- break ;
- case 15 :
- if ( itsallover () )
- return ;
- break ;
- case 23 :
- case 122 :
- case 222 :
- case 70 :
- case 170 :
- case 270 :
- case 39 :
- case 45 :
- case 49 :
- case 149 :
- case 7 :
- case 107 :
- case 207 :
- reportillegalcase () ;
- break ;
- case 8 :
- case 108 :
- case 9 :
- case 109 :
- case 18 :
- case 118 :
- case 69 :
- case 169 :
- case 51 :
- case 151 :
- case 16 :
- case 116 :
- case 50 :
- case 150 :
- case 53 :
- case 153 :
- case 66 :
- case 166 :
- case 54 :
- case 154 :
- case 55 :
- case 155 :
- case 57 :
- case 157 :
- case 56 :
- case 156 :
- case 31 :
- case 131 :
- case 52 :
- case 152 :
- case 29 :
- case 129 :
- case 47 :
- case 147 :
- case 210 :
- case 214 :
- case 215 :
- case 228 :
- case 225 :
- case 234 :
- case 237 :
- insertdollarsign () ;
- break ;
- case 37 :
- case 136 :
- case 236 :
- {
- {
- mem [ curlist .tailfield ] .hh .v.RH = scanrulespec () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- if ( abs ( curlist .modefield ) == 1 )
- curlist .auxfield = -65536000L ;
- else if ( abs ( curlist .modefield ) == 101 )
- curlist .auxfield = 1000 ;
- }
- break ;
- case 28 :
- case 127 :
- case 227 :
- case 229 :
- appendglue () ;
- break ;
- case 30 :
- case 130 :
- case 230 :
- case 231 :
- appendkern () ;
- break ;
- case 2 :
- case 102 :
- newsavelevel ( 1 ) ;
- break ;
- case 62 :
- case 162 :
- case 262 :
- newsavelevel ( 14 ) ;
- break ;
- case 63 :
- case 163 :
- case 263 :
- if ( curgroup == 14 )
- unsave () ;
- else offsave () ;
- break ;
- case 3 :
- case 103 :
- case 203 :
- handlerightbrace () ;
- break ;
- case 22 :
- case 123 :
- case 223 :
- {
- t = curchr ;
- scandimen ( false , false , false ) ;
- if ( t == 0 )
- savestack [ saveptr + 0 ] .cint = curval ;
- else savestack [ saveptr + 0 ] .cint = - (integer) curval ;
- scanbox () ;
- }
- break ;
- case 32 :
- case 132 :
- case 232 :
- {
- savestack [ saveptr + 0 ] .cint = 1073742237L + curchr ;
- scanbox () ;
- }
- break ;
- case 21 :
- case 121 :
- case 221 :
- {
- savestack [ saveptr + 0 ] .cint = 0 ;
- beginbox () ;
- }
- break ;
- case 44 :
- newgraf ( curchr > 0 ) ;
- break ;
- case 12 :
- case 13 :
- case 17 :
- case 68 :
- case 4 :
- case 24 :
- case 36 :
- case 46 :
- case 48 :
- case 27 :
- case 34 :
- case 65 :
- {
- backinput () ;
- newgraf ( true ) ;
- }
- break ;
- case 144 :
- case 244 :
- indentinhmode () ;
- break ;
- case 14 :
- {
- normalparagraph () ;
- if ( curlist .modefield > 0 )
- buildpage () ;
- }
- break ;
- case 114 :
- {
- if ( alignstate < 0 )
- offsave () ;
- endgraf () ;
- if ( curlist .modefield == 1 )
- buildpage () ;
- }
- break ;
- case 115 :
- case 128 :
- case 137 :
- case 125 :
- case 133 :
- headforvmode () ;
- break ;
- case 38 :
- case 138 :
- case 238 :
- case 139 :
- case 239 :
- begininsertoradjust () ;
- break ;
- case 19 :
- case 119 :
- case 219 :
- makemark () ;
- break ;
- case 43 :
- case 143 :
- case 243 :
- appendpenalty () ;
- break ;
- case 26 :
- case 126 :
- case 226 :
- deletelast () ;
- break ;
- case 25 :
- case 124 :
- case 224 :
- unpackage () ;
- break ;
- case 145 :
- appenditaliccorrecti () ;
- break ;
- case 245 :
- {
- mem [ curlist .tailfield ] .hh .v.RH = newkern ( 0 ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- break ;
- case 148 :
- case 248 :
- appenddiscretionary () ;
- break ;
- case 146 :
- makeaccent () ;
- break ;
- case 6 :
- case 106 :
- case 206 :
- case 5 :
- case 105 :
- case 205 :
- alignerror () ;
- break ;
- case 35 :
- case 135 :
- case 235 :
- noalignerror () ;
- break ;
- case 64 :
- case 164 :
- case 264 :
- omiterror () ;
- break ;
- case 33 :
- case 134 :
- initalign () ;
- break ;
- case 233 :
- if ( privileged () )
- initalign () ;
- break ;
- case 10 :
- case 110 :
- doendv () ;
- break ;
- case 67 :
- case 167 :
- case 267 :
- cserror () ;
- break ;
- case 104 :
- initmath () ;
- break ;
- case 249 :
- if ( privileged () )
- starteqno () ;
- break ;
- case 202 :
- {
- {
- mem [ curlist .tailfield ] .hh .v.RH = newnoad () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- backinput () ;
- scanmath ( curlist .tailfield + 1 ) ;
- }
- break ;
- case 212 :
- case 213 :
- case 268 :
- if ( curchr < 128 )
- setmathchar ( eqtb [ 5139 + curchr ] .hh .v.RH ) ;
- else setmathchar ( curchr ) ;
- break ;
- case 217 :
- {
- scancharnum () ;
- curchr = curval ;
- if ( curchr < 128 )
- setmathchar ( eqtb [ 5139 + curchr ] .hh .v.RH ) ;
- else setmathchar ( curchr ) ;
- }
- break ;
- case 218 :
- {
- scanfifteenbitint () ;
- setmathchar ( curval ) ;
- }
- break ;
- case 269 :
- setmathchar ( curchr ) ;
- break ;
- case 216 :
- {
- scantwentysevenbitin () ;
- setmathchar ( curval / 4096 ) ;
- }
- break ;
- case 251 :
- {
- {
- mem [ curlist .tailfield ] .hh .v.RH = newnoad () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- mem [ curlist .tailfield ] .hh.b0 = curchr ;
- scanmath ( curlist .tailfield + 1 ) ;
- }
- break ;
- case 252 :
- mathlimitswitch () ;
- break ;
- case 266 :
- mathradical () ;
- break ;
- case 246 :
- case 247 :
- mathac () ;
- break ;
- case 257 :
- {
- scanspec () ;
- newsavelevel ( 12 ) ;
- normalparagraph () ;
- pushnest () ;
- curlist .modefield = -1 ;
- curlist .auxfield = -65536000L ;
- if ( eqtb [ 4062 ] .hh .v.RH != 0 )
- begintokenlist ( eqtb [ 4062 ] .hh .v.RH , 11 ) ;
- }
- break ;
- case 254 :
- {
- mem [ curlist .tailfield ] .hh .v.RH = newstyle ( curchr ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- break ;
- case 256 :
- {
- {
- mem [ curlist .tailfield ] .hh .v.RH = newglue ( 0 ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- mem [ curlist .tailfield ] .hh.b1 = 98 ;
- }
- break ;
- case 255 :
- appendchoices () ;
- break ;
- case 209 :
- case 208 :
- subsup () ;
- break ;
- case 253 :
- mathfraction () ;
- break ;
- case 250 :
- mathleftright () ;
- break ;
- case 204 :
- if ( curgroup == 15 )
- aftermath () ;
- else offsave () ;
- break ;
- case 71 :
- case 171 :
- case 271 :
- case 72 :
- case 172 :
- case 272 :
- case 73 :
- case 173 :
- case 273 :
- case 74 :
- case 174 :
- case 274 :
- case 75 :
- case 175 :
- case 275 :
- case 76 :
- case 176 :
- case 276 :
- case 77 :
- case 177 :
- case 277 :
- case 78 :
- case 178 :
- case 278 :
- case 79 :
- case 179 :
- case 279 :
- case 80 :
- case 180 :
- case 280 :
- case 81 :
- case 181 :
- case 281 :
- case 82 :
- case 182 :
- case 282 :
- case 83 :
- case 183 :
- case 283 :
- case 84 :
- case 184 :
- case 284 :
- case 85 :
- case 185 :
- case 285 :
- case 86 :
- case 186 :
- case 286 :
- case 87 :
- case 187 :
- case 287 :
- case 88 :
- case 188 :
- case 288 :
- case 89 :
- case 189 :
- case 289 :
- case 90 :
- case 190 :
- case 290 :
- case 91 :
- case 191 :
- case 291 :
- case 92 :
- case 192 :
- case 292 :
- case 93 :
- case 193 :
- case 293 :
- case 94 :
- case 194 :
- case 294 :
- case 95 :
- case 195 :
- case 295 :
- case 96 :
- case 196 :
- case 296 :
- case 97 :
- case 197 :
- case 297 :
- case 98 :
- case 198 :
- case 298 :
- case 99 :
- case 199 :
- case 299 :
- case 100 :
- case 200 :
- case 300 :
- prefixedcommand () ;
- break ;
- case 41 :
- case 141 :
- case 241 :
- {
- gettoken () ;
- aftertoken = curtok ;
- }
- break ;
- case 42 :
- case 142 :
- case 242 :
- {
- gettoken () ;
- saveforafter ( curtok ) ;
- }
- break ;
- case 61 :
- case 161 :
- case 261 :
- openorclosein () ;
- break ;
- case 59 :
- case 159 :
- case 259 :
- issuemessage () ;
- break ;
- case 58 :
- case 158 :
- case 258 :
- shiftcase () ;
- break ;
- case 20 :
- case 120 :
- case 220 :
- showwhatever () ;
- break ;
- case 60 :
- case 160 :
- case 260 :
- doextension () ;
- break ;
- }
- goto lab60 ;
- lab70: f = eqtb [ 4578 ] .hh .v.RH ;
- c = curchr ;
- lab71: if ( ( c < fontbc [ f ] ) || ( c > fontec [ f ] ) )
- {
- charwarning ( f , c ) ;
- goto lab60 ;
- }
- lab72: q = curlist .tailfield ;
- ligaturepresent = false ;
- l = c ;
- lab73: if ( c < 128 )
- {
- s = eqtb [ 5011 + c ] .hh .v.RH ;
- if ( s == 1000 )
- curlist .auxfield = 1000 ;
- else if ( s < 1000 )
- {
- if ( s > 0 )
- curlist .auxfield = s ;
- }
- else if ( curlist .auxfield < 1000 )
- curlist .auxfield = 1000 ;
- else curlist .auxfield = s ;
- }
- else curlist .auxfield = 1000 ;
- i = fontinfo [ charbase [ f ] + l ] .qqqq ;
- if ( ( i .b0 > 0 ) )
- {
- {
- p = avail ;
- if ( p == 0 )
- p = getavail () ;
- else {
-
- avail = mem [ p ] .hh .v.RH ;
- mem [ p ] .hh .v.RH = 0 ;
- ;
- #ifdef STAT
- incr ( dynused ) ;
- #endif /* STAT */
- }
- }
- mem [ p ] .hh.b0 = f ;
- mem [ p ] .hh.b1 = c ;
- mem [ curlist .tailfield ] .hh .v.RH = p ;
- curlist .tailfield = p ;
- }
- else charwarning ( f , l ) ;
- getnext () ;
- if ( curcmd == 11 )
- r = curchr ;
- else if ( curcmd == 12 )
- r = curchr ;
- else if ( curcmd == 67 )
- r = curchr ;
- else {
-
- xtoken () ;
- if ( ( curcmd == 11 ) || ( curcmd == 12 ) || ( curcmd == 67 ) )
- r = curchr ;
- else if ( curcmd == 16 )
- {
- scancharnum () ;
- r = curval ;
- }
- else r = 256 ;
- }
- if ( ( ( i .b2 ) % 4 ) == 1 )
- if ( r != 256 )
- {
- k = ligkernbase [ f ] + i .b3 ;
- do {
- j = fontinfo [ k ] .qqqq ;
- if ( j .b1 == r )
- if ( j .b2 < 128 )
- {
- ligaturepresent = true ;
- l = j .b3 ;
- c = r ;
- goto lab73 ;
- }
- else {
-
- if ( ligaturepresent )
- {
- p = newligature ( f , l , mem [ q ] .hh .v.RH ) ;
- mem [ q ] .hh .v.RH = p ;
- curlist .tailfield = p ;
- }
- if ( c == hyphenchar [ f ] )
- if ( curlist .modefield == 101 )
- {
- mem [ curlist .tailfield ] .hh .v.RH = newdisc () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- {
- mem [ curlist .tailfield ] .hh .v.RH = newkern ( fontinfo [ kernbase
- [ f ] + j .b3 ] .cint ) ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- c = r ;
- goto lab72 ;
- }
- incr ( k ) ;
- } while ( ! ( j .b0 >= 128 ) ) ;
- }
- if ( ligaturepresent )
- {
- p = newligature ( f , l , mem [ q ] .hh .v.RH ) ;
- mem [ q ] .hh .v.RH = p ;
- curlist .tailfield = p ;
- }
- if ( c == hyphenchar [ f ] )
- if ( curlist .modefield == 101 )
- {
- mem [ curlist .tailfield ] .hh .v.RH = newdisc () ;
- curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ;
- }
- if ( r == 256 )
- goto lab21 ;
- c = r ;
- goto lab71 ;
- lab74: if ( eqtb [ 3538 ] .hh .v.RH == 0 )
- {
- {
- p = fontglue [ eqtb [ 4578 ] .hh .v.RH ] ;
- if ( p == 0 )
- {
- f = eqtb [ 4578 ] .hh .v.RH ;
- p = newspec ( 0 ) ;
- k = parambase [ f ] + 2 ;
- mem [ p + 1 ] .cint = fontinfo [ k ] .cint ;
- mem [ p + 2 ] .cint = fontinfo [ k + 1 ] .cint ;
- mem [ p + 3 ] .cint = fontinfo [ k + 2 ] .cint ;
- fontglue [ f ] = p ;
- }
- }
- q = newglue ( p ) ;
- }
- else q = newparamglue ( 12 ) ;
- mem [ curlist .tailfield ] .hh .v.RH = q ;
- curlist .tailfield = q ;
- goto lab60 ;
- }
- giveerrhelp () {
- giveerrhelp_regmem
- tokenshow ( eqtb [ 4065 ] .hh .v.RH ) ;
- }
- boolean openfmtfile () {
- /* 40 10 */ register boolean Result;
- openfmtfile_regmem
- integer j ;
- j = curinput .locfield ;
- if ( buffer [ curinput .locfield ] == 38 )
- {
- incr ( curinput .locfield ) ;
- j = curinput .locfield ;
- buffer [ last ] = 32 ;
- while ( buffer [ j ] != 32 ) incr ( j ) ;
- packbufferedname ( 0 , curinput .locfield , j - 1 ) ;
- if ( wopenin ( fmtfile ) )
- goto lab40 ;
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "Sorry, I can't find that format; will try PLAIN.");
- #else
- (void) fprintf( stdout , "%s%s\n", "Sorry, I can't find that format;" , " will try PLAIN." ) ;
- #endif
- termflush ( stdout ) ;
- }
- packbufferedname ( 5 , 1 , 0 ) ;
- if ( ! wopenin ( fmtfile ) )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "I can't find the PLAIN format file!" ) ;
- #else
- (void) fprintf( stdout , "%s\n", "I can't find the PLAIN format file!" ) ;
- #endif
- Result = false ;
- return(Result) ;
- }
- lab40: curinput .locfield = j ;
- Result = true ;
- return(Result) ;
- }
- boolean loadfmtfile () {
- /* 6666 10 */ register boolean Result;
- loadfmtfile_regmem
- integer j, k ;
- halfword p, q ;
- integer x ;
- getfmtint ( x ) ;
- if ( x != 67218746L )
- goto lab6666 ;
- getfmtint ( x ) ;
- if ( x != 0 )
- goto lab6666 ;
- getfmtint ( x ) ;
- if ( x != memtop )
- goto lab6666 ;
- getfmtint ( x ) ;
- if ( x != 5976 )
- goto lab6666 ;
- getfmtint ( x ) ;
- if ( x != 2551 )
- goto lab6666 ;
- getfmtint ( x ) ;
- if ( x != 307 )
- goto lab6666 ;
- {
- getfmtint ( x ) ;
- if ( x < 0 )
- goto lab6666 ;
- if ( x > poolsize )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "---! Must increase the string pool size" ) ;
- #else
- (void) fprintf( stdout , "%s%s\n", "---! Must increase the " , "string pool size" ) ;
- #endif
- goto lab6666 ;
- }
- else poolptr = x ;
- }
- {
- getfmtint ( x ) ;
- if ( x < 0 )
- goto lab6666 ;
- if ( x > maxstrings )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "---! Must increase the max strings" ) ;
- #else
- (void) fprintf( stdout , "%s%s\n", "---! Must increase the " , "max strings" ) ;
- #endif
- goto lab6666 ;
- }
- else strptr = x ;
- }
- undumpthings ( strstart [ 0 ] , strptr + 1 ) ;
- undumpthings ( strpool [ 0 ] , poolptr ) ;
- {
- getfmtint ( x ) ;
- if ( ( x < 1019 ) || ( x > memtop - 14 ) )
- goto lab6666 ;
- else lomemmax = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 20 ) || ( x > lomemmax ) )
- goto lab6666 ;
- else rover = x ;
- }
- p = 0 ;
- q = rover ;
- x = 0 ;
- do {
- undumpthings ( mem [ p ] , q + 2 - p ) ;
- p = q + mem [ q ] .hh .v.LH ;
- if ( ( p > lomemmax ) || ( ( q >= mem [ q + 1 ] .hh .v.RH ) && ( mem [ q +
- 1 ] .hh .v.RH != rover ) ) )
- goto lab6666 ;
- q = mem [ q + 1 ] .hh .v.RH ;
- } while ( ! ( q == rover ) ) ;
- undumpthings ( mem [ p ] , lomemmax + 1 - p ) ;
- if ( memmin < -2 )
- {
- p = mem [ rover + 1 ] .hh .v.LH ;
- q = memmin + 1 ;
- mem [ memmin ] .hh .v.RH = 0 ;
- mem [ memmin ] .hh .v.LH = 0 ;
- mem [ p + 1 ] .hh .v.RH = q ;
- mem [ rover + 1 ] .hh .v.LH = q ;
- mem [ q + 1 ] .hh .v.RH = rover ;
- mem [ q + 1 ] .hh .v.LH = p ;
- mem [ q ] .hh .v.RH = 65535L ;
- mem [ q ] .hh .v.LH = -0 - q ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < lomemmax + 1 ) || ( x > memtop - 13 ) )
- goto lab6666 ;
- else himemmin = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > memtop ) )
- goto lab6666 ;
- else avail = x ;
- }
- memend = memtop ;
- undumpthings ( mem [ himemmin ] , memend + 1 - himemmin ) ;
- getfmtint ( varused ) ;
- getfmtint ( dynused ) ;
- k = 1 ;
- do {
- getfmtint ( x ) ;
- if ( ( x < 1 ) || ( k + x > 5977 ) )
- goto lab6666 ;
- undumpthings ( eqtb [ k ] , x ) ;
- k = k + x ;
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( k + x > 5977 ) )
- goto lab6666 ;
- {register integer for_end; j = k ; for_end = k + x - 1 ; if ( j <=
- for_end) do
- eqtb [ j ] = eqtb [ k - 1 ] ;
- while ( j++ < for_end ) ; }
- k = k + x ;
- } while ( ! ( k > 5976 ) ) ;
- {
- getfmtint ( x ) ;
- if ( ( x < 258 ) || ( x > 3258 ) )
- goto lab6666 ;
- else parloc = x ;
- }
- partoken = 4096 + parloc ;
- {
- getfmtint ( x ) ;
- if ( ( x < 258 ) || ( x > 3258 ) )
- goto lab6666 ;
- else
- writeloc = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 258 ) || ( x > 3258 ) )
- goto lab6666 ;
- else hashused = x ;
- }
- p = 257 ;
- do {
- {
- getfmtint ( x ) ;
- if ( ( x < p + 1 ) || ( x > hashused ) )
- goto lab6666 ;
- else p = x ;
- }
- getfmthh ( hash [ p ] ) ;
- } while ( ! ( p == hashused ) ) ;
- undumpthings ( hash [ hashused + 1 ] , 3524 - hashused ) ;
- getfmtint ( cscount ) ;
- {
- getfmtint ( x ) ;
- if ( x < 7 )
- goto lab6666 ;
- if ( x > fontmemsize )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "---! Must increase the font mem size" ) ;
- #else
- (void) fprintf( stdout , "%s%s\n", "---! Must increase the " , "font mem size" ) ;
- #endif
- goto lab6666 ;
- }
- else fmemptr = x ;
- }
- {
- undumpthings ( fontinfo [ 0 ] , fmemptr ) ;
- {
- getfmtint ( x ) ;
- if ( x < 0 )
- goto lab6666 ;
- if ( x > fontmax )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "---! Must increase the font max" ) ;
- #else
- (void) fprintf( stdout , "%s%s\n", "---! Must increase the " , "font max" ) ;
- #endif
- goto lab6666 ;
- }
- else fontptr = x ;
- }
- undumpthings ( fontcheck [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontsize [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontdsize [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontparams [ 0 ] , fontptr + 1 ) ;
- undumpthings ( hyphenchar [ 0 ] , fontptr + 1 ) ;
- undumpthings ( skewchar [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontname [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontarea [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontbc [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontec [ 0 ] , fontptr + 1 ) ;
- undumpthings ( charbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( widthbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( heightbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( depthbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( italicbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( ligkernbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( kernbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( extenbase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( parambase [ 0 ] , fontptr + 1 ) ;
- undumpthings ( fontglue [ 0 ] , fontptr + 1 ) ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > 307 ) )
- goto lab6666 ;
- else hyphcount = x ;
- }
- {register integer for_end; k = 1 ; for_end = hyphcount ; if ( k <= for_end)
- do
- {
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > 307 ) )
- goto lab6666 ;
- else j = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > strptr ) )
- goto lab6666 ;
- else hyphword [ j ] = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > 65535L ) )
- goto lab6666 ;
- else hyphlist [ j ] = x ;
- }
- }
- while ( k++ < for_end ) ; }
- {
- getfmtint ( x ) ;
- if ( x < 0 )
- goto lab6666 ;
- if ( x > triesize )
- {
- wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "---! Must increase the trie size" ) ;
- #else
- (void) fprintf( stdout , "%s%s\n", "---! Must increase the " , "trie size" ) ;
- #endif
- goto lab6666 ;
- }
- else triemax = x ;
- }
- undumpthings ( trie [ 0 ] , triemax + 1 ) ;
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > 255 ) )
- goto lab6666 ;
- else trieopptr = x ;
- }
- undumpthings ( hyfdistance [ 1 ] , trieopptr - 0 ) ;
- undumpthings ( hyfnum [ 1 ] , trieopptr - 0 ) ;
- undumpthings ( hyfnext [ 1 ] , trieopptr - 0 ) ;
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > 3 ) )
- goto lab6666 ;
- else interaction = x ;
- }
- {
- getfmtint ( x ) ;
- if ( ( x < 0 ) || ( x > strptr ) )
- goto lab6666 ;
- else formatident = x ;
- }
- getfmtint ( x ) ;
- if ( ( x != 69069L ) || eof ( fmtfile ) )
- goto lab6666 ;
- Result = true ;
- return(Result) ;
- lab6666: wakeupterminal () ;
- #ifdef RISC_OS
- (void) Fputs( stdout , "(Fatal format file error; I'm stymied)" );
- #else
- (void) fprintf( stdout , "%s\n", "(Fatal format file error; I'm stymied)" );
- #endif
- Result = false ;
- return(Result) ;
- }
- closefilesandtermina () {
- closefilesandtermina_regmem
- integer k ;
- {register integer for_end; k = 0 ; for_end = 15 ; if ( k <= for_end) do
- if ( writeopen [ k ] )
- aclose ( writefile [ k ] ) ;
- while ( k++ < for_end ) ; }
- ;
- #ifdef STAT
- if ( eqtb [ 5298 ] .cint > 0 )
- if ( jobname > 0 )
- {
- (void) fprintf( logfile , "%c\n", ' ' ) ;
- (void) fprintf( logfile , "%s%s\n", "Here is how much of TeX's memory" , " you used:" ) ;
- (void) fprintf( logfile , "%c%ld%s", ' ' , (long)strptr - initstrptr , " string" ) ;
- if ( strptr != initstrptr + 1 )
- (void) putc( 's' , logfile );
- (void) fprintf( logfile , "%s%ld\n", " out of " , (long)maxstrings - initstrptr ) ;
- (void) fprintf( logfile , "%c%ld%s%ld\n", ' ' , (long)poolptr - initpoolptr , " string characters out of " , (long)poolsize - initpoolptr ) ;
- (void) fprintf( logfile , "%c%ld%s%ld\n", ' ' , (long)lomemmax - memmin + memend - himemmin + 2 , " words of memory out of " , (long)memend + 1 - memmin ) ;
- (void) fprintf( logfile , "%c%ld%s%ld\n", ' ' , (long)cscount , " multiletter control sequences out of " , (long)3000 ) ;
- (void) fprintf( logfile , "%c%ld%s%ld%s", ' ' , (long)fmemptr , " words of font info for " , (long)fontptr - 0 , " font" ) ;
- if ( fontptr != 1 )
- (void) putc( 's' , logfile );
- (void) fprintf( logfile , "%s%ld%s%ld\n", ", out of " , (long)fontmemsize , " for " , (long)fontmax - 0 ) ;
- (void) fprintf( logfile , "%c%ld%s", ' ' , (long)hyphcount , " hyphenation exception" ) ;
- if ( hyphcount != 1 )
- (void) putc( 's' , logfile );
- (void) fprintf( logfile , "%s%ld\n", " out of " , (long)307 ) ;
- (void) fprintf( logfile , "%c%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%c\n", ' ' , (long)maxinstack , "i," , (long)maxneststack , "n," , (long)maxparamstack , "p," , (long)maxbufstack + 1 , "b," , (long)maxsavestack + 6 , "s stack positions out of " , (long)stacksize , "i," , (long)nestsize , "n," , (long)paramsize , "p," , (long)bufsize , "b," , (long)savesize , 's' ) ;
- }
- #endif /* STAT */
- while ( curs > -1 ) {
-
- if ( curs > 0 )
- {
- dvibuf [ dviptr ] = 142 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- else {
-
- {
- dvibuf [ dviptr ] = 140 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- incr ( totalpages ) ;
- }
- decr ( curs ) ;
- }
- if ( totalpages == 0 )
- printnl ( 690 ) ;
- else {
-
- {
- dvibuf [ dviptr ] = 248 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- dvifour ( lastbop ) ;
- lastbop = dvioffset + dviptr - 5 ;
- dvifour ( 25400000L ) ;
- dvifour ( 473628672L ) ;
- preparemag () ;
- dvifour ( eqtb [ 5284 ] .cint ) ;
- dvifour ( maxv ) ;
- dvifour ( maxh ) ;
- {
- dvibuf [ dviptr ] = maxpush / 256 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- {
- dvibuf [ dviptr ] = maxpush % 256 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- {
- dvibuf [ dviptr ] = totalpages / 256 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- {
- dvibuf [ dviptr ] = totalpages % 256 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- while ( fontptr > 0 ) {
-
- if ( fontused [ fontptr ] )
- dvifontdef ( fontptr ) ;
- decr ( fontptr ) ;
- }
- {
- dvibuf [ dviptr ] = 249 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- dvifour ( lastbop ) ;
- {
- dvibuf [ dviptr ] = 2 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- k = 4 + ( ( dvibufsize - dviptr ) % 4 ) ;
- while ( k > 0 ) {
-
- {
- dvibuf [ dviptr ] = 223 ;
- incr ( dviptr ) ;
- if ( dviptr == dvilimit )
- dviswap () ;
- }
- decr ( k ) ;
- }
- if ( dvilimit == halfbuf )
- writedvi ( halfbuf , dvibufsize - 1 ) ;
- if ( dviptr > 0 )
- writedvi ( 0 , dviptr - 1 ) ;
- printnl ( 691 ) ;
- print ( outputfilename ) ;
- print ( 155 ) ;
- printint ( totalpages ) ;
- print ( 692 ) ;
- if ( totalpages != 1 )
- printchar ( 115 ) ;
- print ( 693 ) ;
- printint ( dvioffset + dviptr ) ;
- print ( 694 ) ;
- bclose ( dvifile ) ;
- }
- if ( jobname > 0 )
- {
- (void) putc('\n', logfile );
- aclose ( logfile ) ;
- selector = selector - 2 ;
- if ( selector == 17 )
- {
- printnl ( 1120 ) ;
- print ( logname ) ;
- printchar ( 46 ) ;
- }
- }
- println () ;
- if ( ( editnamestart != 0 ) && ( interaction > 0 ) )
- calledit ( strpool , editnamestart , editnamelength , editline ) ;
- }
- #ifdef DEBUG
- debughelp () {
- /* 888 10 */ debughelp_regmem
- integer k, l, m, n ;
- while ( true ) {
-
- wakeupterminal () ;
- printnl ( 1128 ) ;
- termflush ( stdout ) ;
- read ( stdin , m ) ;
- if ( m < 0 )
- return ;
- else if ( m == 0 )
- dumpcore () ;
- else {
-
- read ( stdin , n ) ;
- switch ( m )
- {case 1 :
- printword ( mem [ n ] ) ;
- break ;
- case 2 :
- printint ( mem [ n ] .hh .v.LH ) ;
- break ;
- case 3 :
- printint ( mem [ n ] .hh .v.RH ) ;
- break ;
- case 4 :
- printword ( eqtb [ n ] ) ;
- break ;
- case 5 :
- printword ( fontinfo [ n ] ) ;
- break ;
- case 6 :
- printword ( savestack [ n ] ) ;
- break ;
- case 7 :
- showbox ( n ) ;
- break ;
- case 8 :
- {
- breadthmax = 10000 ;
- depththreshold = poolsize - poolptr - 10 ;
- shownodelist ( n ) ;
- }
- break ;
- case 9 :
- showtokenlist ( n , 0 , 1000 ) ;
- break ;
- case 10 :
- print ( n ) ;
- break ;
- case 11 :
- checkmem ( n > 0 ) ;
- break ;
- case 12 :
- searchmem ( n ) ;
- break ;
- case 13 :
- {
- read ( stdin , l ) ;
- printcmdchr ( n , l ) ;
- }
- break ;
- case 14 :
- {register integer for_end; k = 0 ; for_end = n ; if ( k <= for_end)
- do
- print ( buffer [ k ] ) ;
- while ( k++ < for_end ) ; }
- break ;
- case 15 :
- {
- fontinshortdisplay = 0 ;
- shortdisplay ( n ) ;
- }
- break ;
- case 16 :
- panicking = ! panicking ;
- break ;
- default:
- print ( 63 ) ;
- break ;
- }
- }
- }
- }
- #endif /* DEBUG */
-